﻿using System;
using System.Collections.Generic;

using System.Text;
using System.Xml.Serialization;
using System.IO;
using System.Xml;
using System.Runtime.Serialization;

namespace VTCeBank.SSO.Utils
{
    public static class XMLUtility
    {

        //Creates an object from an XML string.
        public static object FromXml(string Xml, System.Type ObjType)
        {
            using (StringReader stringReader = new StringReader(Xml))
            {
                using (XmlTextReader xmlReader = new XmlTextReader(stringReader))
                {
                    return new XmlSerializer(ObjType).Deserialize(xmlReader);
                }

            }

        }


    }
}
